<template>
    <div class="goodsdesc-container">
        <h1>{{info.title}}</h1>
        <hr>
        <div v-html="info.content" class="content"></div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                id: this.$route.params.id,
                info: {}
            }
        },
        created() {
            this.getGoodsDesc();
        },
        methods: {
            getGoodsDesc() {
                this.$http.get("api/goods/getdesc/" + this.id).then(result => {
                    if (result.body.status === 0) {
                        this.info = result.body.message[0]
                    }
                })
            }
        }
    }
</script>

<style scoped>
    .goodsdesc-container {
        padding: 4px;
    }

    h1 {
        color: #226aff;
        font-size: 16px;
        text-align: center;
        margin: 15px 0;
    }

    .content >>> img {
        width: 100%;
        height:100%;
    }


</style>